import sys
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QApplication, QLabel, \
    QMainWindow
                                                 
                                         
class PySide6MinWindow(QMainWindow):
    
    def __init__(self):
        super(PySide6MinWindow, self).__init__()
        
        self.setCentralWidget(QLabel("Hello World", alignment=Qt.AlignCenter))
    
        self.resize(480, 320)
                                                     
if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = PySide6MinWindow()
    window.show()
    sys.exit(app.exec_())
    
    
    
# 此示例来自 https://wiki.qt.io/Qt_for_Python
    # 链接来自 https://pypi.org/project/PySide6/ 中的 Homepage 
    
# QMainWindow 化
    # 参考 https://www.perfcode.com/p/pyside6-window.html